/****************************************************************************
@FILENAME:	codec.c
@FUNCTION:	detect by decode define
@AUTHOR:	flege.zhang
@DATE:		2020.05.11
@COPYRIGHT(C) ZXW 2020
*****************************************************************************/

#include "codec.h"
#include "tccr.h"



void detect_decode_init()
{
#if((HW_DETECT_TYPE == DECODE_V8T04A_TYPE) || (HW_DETECT_TYPE == DECODE_V8T04A_16_TYPE))
	//enable tccr to decode
	tccr_init(VALID_SIGNAL_TCCR_TIMEOUT,TCCR_INT_ALL_EN);
	decode_v8t04a_init();
#elif(HW_DETECT_TYPE == DECODE_UART_TYPE)
	decode_uart_init(UART_BAUDRATE_INDEX);
#elif(HW_DETECT_TYPE == DECODE_433_TYPE)
	//enable tccr to decode
	tccr_init(VALID_433_SIGNAL_TCCR_TIMEOUT,TCCR_INT_ALL_EN);
	decode_433_init();
#else
	//TBD
#endif
}


